///////////////////////////////////////////////////////////////////////////////
//-----------------------------------------------------------------------------
#include <Scene/Mover.h>

//-----------------------------------------------------------------------------

Mover::Mover ()
{
	position = Vec3f ( 0.0f, 0.0f, 0.0f );
	rotation = Vec3f ( 0.0f, 0.0f, 0.0f );
	scale = Vec3f ( 1.0f, 1.0f, 1.0f );
	moved = true;
}

//-----------------------------------------------------------------------------

bool Mover::hasMoved ()
{
	return moved;
}

//-----------------------------------------------------------------------------

void Mover::setMoved ( bool moved )
{
	this->moved = moved;
}

//-----------------------------------------------------------------------------

Vec3f Mover::getPosition ()
{
	return position;
}

//-----------------------------------------------------------------------------

Vec3f Mover::getRotation ()
{
	return rotation;
}

//-----------------------------------------------------------------------------

Vec3f Mover::getScale ()
{
	return scale;
}

//-----------------------------------------------------------------------------

void Mover::setPosition ( float x, float y, float z )
{
	position.x = x;
	position.y = y;
	position.z = z;
	moved = true;
}

//-----------------------------------------------------------------------------

void Mover::setPosition ( Vec3f trans )
{
	position = trans;
	moved = true;
}

//-----------------------------------------------------------------------------

void Mover::setRotation ( float x, float y, float z )
{
	rotation.x = x;
	rotation.y = y;
	rotation.z = z;
	moved = true;
}

//-----------------------------------------------------------------------------

void Mover::setRotation ( Vec3f rot )
{
	rotation = rot;
	moved = true;
}

//-----------------------------------------------------------------------------

void Mover::setScale ( float x, float y, float z )
{
	scale.x = x;
	scale.y = y;
	scale.z = z;
	moved = true;
}

//-----------------------------------------------------------------------------

void Mover::setScale ( Vec3f scale )
{
	scale = scale;
	moved = true;
}

//-----------------------------------------------------------------------------

void Mover::moveAlongX ( float dist )
{
	position.x += dist;
	moved = true;
}

//-----------------------------------------------------------------------------

void Mover::moveAlongY ( float dist )
{
	position.y += dist;
	moved = true;
}

//-----------------------------------------------------------------------------

void Mover::moveAlongZ ( float dist )
{
	position.z += dist;
	moved = true;
}

//-----------------------------------------------------------------------------

void Mover::rotateAroundX ( float angle )
{
	rotation.x += angle;
	moved = true;
}

//-----------------------------------------------------------------------------

void Mover::rotateAroundY ( float angle )
{
	rotation.y += angle;
	moved = true;
}

//-----------------------------------------------------------------------------

void Mover::rotateAroundZ ( float angle )
{
	rotation.z += angle;
	moved = true;
}

//-----------------------------------------------------------------------------

void Mover::moveAlongForward ( float dist )
{
	moveAlongZ ( dist );
}

//-----------------------------------------------------------------------------

void Mover::moveAlongRight ( float dist )
{
	moveAlongX ( dist );
}

//-----------------------------------------------------------------------------

void Mover::moveAlongUp ( float dist )
{
	moveAlongY ( dist );
}

//-----------------------------------------------------------------------------

void Mover::rotateAroundForward ( float angle )
{
	rotateAroundZ ( angle );
}

//-----------------------------------------------------------------------------

void Mover::rotateAroundRight ( float angle )
{
	rotateAroundX ( angle );
}

//-----------------------------------------------------------------------------

void Mover::rotateAroundUp ( float angle )
{
	rotateAroundY ( angle );
}

//-----------------------------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////
